import {Layout, Header, Aside, Main, Footer} from './layout';
import Row from 'vant/lib/row'
import 'vant/lib/row/style'
import Col from 'vant/lib/col'
import 'vant/lib/col/style'
import BoxCenter from './box-center';
import BoxSkin from './box-skin';
import FootNav from './foot-nav';
import Launch from './launch';
import SingleCenter from './single-center';

const components = {
    CRow: Row,
    CCol: Col,
    BoxCenter,
    BoxSkin,
    FootNav,
    Launch,
    SingleCenter,
    Layout,
    Header,
    Aside,
    Main,
    Footer
}

const install = (app) => {
    Object.keys(components).forEach(key => {
        if(key === 'CRow' || key === 'CCol') {
            app.component(key, components[key])
          }else{
            app.component(components[key]['name'], components[key])
          }
    })
}

const Mui = {
    install
}
export default Mui